home *** CD-ROM | disk | FTP | other *** search
/ Hello Kitty - Big Fun Shapes & Numbers / Hello Kitty - Big Fun Shapes & Numbers (USA).bin / mac / _MATH / 00427.ls < prev    next >
Encoding:
Text File  |  1995-05-08  |  1.9 KB  |  80 lines

  1. set oldLevel to level
  2. set C to the clickOn
  3. set t to the top of sprite C
  4. set b to the bottom of sprite C
  5. set h to b - t
  6. set levelControl to (level * 2) - 1
  7. repeat while the mouseDown
  8.   set oldLevelControl to levelControl
  9.   set y to the mouseV - 4
  10.   if y > b then
  11.     set y to b
  12.   end if
  13.   if y < t then
  14.     set y to t
  15.   end if
  16.   set levelControl to ((b - y) / (h / 4)) + 1
  17.   set the castNum of sprite C to the number of cast ("level" & levelControl)
  18.   if oldLevelControl <> levelControl then
  19.     puppetSound("CrankTick")
  20.   end if
  21.   updateStage()
  22. end repeat
  23. if level = 2 then
  24.   set numCorrect4Lev2 to numCorrect
  25. end if
  26. if level = 3 then
  27.   set numCorrect4Lev3 to numCorrect
  28. end if
  29. if levelControl <= 2 then
  30.   set level to 1
  31. end if
  32. if levelControl = 3 then
  33.   set level to 2
  34. end if
  35. if levelControl >= 4 then
  36.   set level to 3
  37. end if
  38. if level = 2 then
  39.   set numCorrect to numCorrect4Lev2
  40. end if
  41. if level = 3 then
  42.   set numCorrect to numCorrect4Lev3
  43. end if
  44. if not integerp(numCorrect) then
  45.   set numCorrect to 0
  46. end if
  47. set lastWrongAnswer to numCorrect
  48. if level < oldLevel then
  49.   if oldLevel = 2 then
  50.     set numCorrect4Lev2 to 0
  51.   end if
  52.   if oldLevel = 3 then
  53.     set numCorrect4Lev3 to 0
  54.   end if
  55. end if
  56. set the castNum of sprite C to the number of cast ("level" & (level * 2) - 1)
  57. if ((level * 2) - 1) <> levelControl then
  58.   puppetSound("CrankTick")
  59. end if
  60. updateStage()
  61. if oldLevel <> level then
  62.   set correctCounter2 to 0
  63.   set numWrong to 0
  64.   if (scene = 2) and the castNum of sprite 17 then
  65.     set the locH of sprite 4 to the locH of sprite 4 - 512
  66.     set the locH of sprite 17 to the locH of sprite 17 - 512
  67.     updateStage()
  68.   end if
  69.   if spriteInAction then
  70.     set the locH of sprite spriteInAction to -256
  71.     updateStage()
  72.     removehider()
  73.     grabBackground()
  74.     turncharactersoff()
  75.     put numChar into word gNumber of numCharacters
  76.   end if
  77.   clearTheDecks()
  78.   go("level" & level)
  79. end if
  80.